package com.zr.repertory.affiliation.controller;

import com.zr.repertory.affiliation.model.pojo.WareAreaAttribute;
import com.zr.repertory.affiliation.service.WareAreaService;
import com.zr.utils.result.ResultBuilderUtil;
import com.zr.utils.result.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName StorageSectionController
 * @Description TODO
 * @Author Jiakui_Ma
 * @Date 2019/11/21 19:44
 */
@RestController
@CrossOrigin
@RequestMapping("storageSection")
public class StorageSectionController {

    @Autowired
    private WareAreaService wareAreaService;
    /**
     * // 库区属性下拉列表
     * @param id
     * @return
     */
    @GetMapping("queryBusinessAttributeById")
    public ResultUtil queryBusinessAttributeById(Integer id){
        List<WareAreaAttribute> wareAreaAttributeList = wareAreaService.queryBusinessAttributeById(id);
        return ResultBuilderUtil.success(wareAreaAttributeList);
    }

}
